/**
 *  frame script
 *
 *  @author : jihuaizhi
 *  @Time   : 2010.03.22 21:08:10 CST
 *  @note   :
 */
import flash.events.MouseEvent;

import mx.core.Application;

[Bindable]
public var screenDPI:Number;
public var screenResolutionX:Number;
public var screenResolutionY:Number;

private var displayState:String;

private function initView():void
{
//	leftView.addEventListener(MouseEvent.CLICK,);

    Application.application.frameView.currentState="LoginViewState";
    screenDPI=Capabilities.screenDPI;
    screenResolutionX=Capabilities.screenResolutionX;
    screenResolutionY=Capabilities.screenResolutionY;

    mainView.mainViewStack.selectedChild=mainView.mainLoginView;
}

private function completeView(event:Event):void
{
    displayState=systemManager.stage.displayState;
}



public function openWelcomeView(event:Event=null):void
{
    Application.application.frameView.currentState="";
    mainView.mainViewStack.selectedChild=mainView.mainWelcomeView;
    Application.application.frameView.mainView.mainWelcomeView.openView();
    topView.topViewStack.selectedChild=topView.loginTopView;
}

public function openLoginView(event:Event=null):void
{
    Application.application.frameView.currentState="LoginViewState";
    mainView.mainViewStack.selectedChild=mainView.mainLoginView;
    topView.topViewStack.selectedChild=topView.logoutTopView;
}

public function openListView(event:Event=null):void
{
    mainView.mainViewStack.selectedChild=mainView.mainListView;
}


public function openFormView(event:Event=null):void
{
    mainView.mainViewStack.selectedChild=mainView.defectEditView;
}